//
//  ChatAddressBookCell.m
//  projectOfTeamSample
//
//  Created by lanou3g on 15/11/18.
//  Copyright © 2015年 liukai. All rights reserved.
//

#import "ChatAddressBookCell.h"

@implementation ChatAddressBookCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setupSubView];
    }
    return self;
}
-(void)setupSubView{
    //头像
    self.headImage = [[UIImageView alloc]initWithFrame:CGRectMake(5, 5, 65, 65)];
    
    self.headImage.layer.cornerRadius = 65 / 2;
    [self.headImage.layer setMasksToBounds:YES];
    [self.contentView addSubview:self.headImage];
    
    //用户名
    self.userName = [[UILabel alloc]initWithFrame:CGRectMake(85, 5, self.contentView.bounds.size.width - 10, 65)];
    self.userName.font = [UIFont systemFontOfSize:20];
    [self.contentView addSubview:self.userName];

    
  
    self.userName.backgroundColor = [UIColor yellowColor];
    self.headImage.backgroundColor = [UIColor redColor];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
